<?php  

    require_once("controller/TarefaController.class.php");

    $objTarefa = new TarefaController();
    
    if(!@$_REQUEST['action']){
        $objTarefa->listaTarefa();
    }
    else if($_REQUEST['action']=='addTarefa'){
        $objTarefa->addTarefa();
    } 
    else if($_REQUEST['action']=='editTarefa'){
        $objTarefa->editTarefa($_REQUEST['idtarefa']);
    }
    else if($_REQUEST['action']=='delTarefa'){
        $objTarefa->delTarefa($_REQUEST['idtarefa']);
    }
?>